package com.D5Power.Render
{
	import com.D5Power.Objects.GameObject;
	import com.D5Power.Objects.IName;
	import com.D5Power.Objects.NCharacterObject;
	
	import flash.geom.Point;
	import flash.geom.Rectangle;

	public class RenderNCharacter extends RenderAllCharacter
	{
		/**
		 * 是否镜像
		 */ 
		private var ismirror:Boolean = false;
		
		public function RenderNCharacter()
		{
			super();
		}
		
		override public function render(o:GameObject):void
		{
			var c:NCharacterObject = o as NCharacterObject;

			
			var target:Point = c.controler.perception.Scene.Map.getScreenPostion(c.Pos.x,c.Pos.y);
			var p:Point = new Point(int(target.x-c.graphics.frameWidth/2),int(target.y-c.graphics.frameHeight+c.renderY));
			
			renderShadow(c,p);
			if(c.directionNum>=0)
			{
				draw(c.graphics.bitmap,c.renderRect,p);
			}else{
				draw(c.graphics.mirrorBitmapData,c.renderRect,p);
			}
			
			showname(c as IName,p);
			renderStuff(c,p);
		}
	}
}